/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.calendar.v2;

import com.google.api.client.googleapis.GoogleUrl;
import com.google.api.client.util.DateTime;
import com.google.api.client.util.Key;

/**
 * URL for calendar API.<br>
 * It contains a list of all the URL parameters for the feed.
 * 
 * @author Alain Vongsouvanh
 */
public class CalendarUrl extends GoogleUrl {

  /** Valid values for the sortOrder attribute */
  public static enum SortOrder {
    ascending, descending;
  }

  /** Valid values for the orderBy attribute */
  public static enum OrderBy {
    lastmodified, starttime;
  }

  /**
   * The current time zone. If not specified, times are returned in the calendar
   * time zone.
   */
  @Key("ctz")
  public String ctz;

  /** Request only future events. */
  @Key("futureevents")
  public Boolean futureEvents;

  /** Sorting criterion. */
  @Key("orderby")
  public OrderBy orderBy;

  /**
   * Specifies beginning of time period for which to expand recurring events.
   */
  @Key("recurrence-expansion-start")
  public DateTime recurrenceExpansionStart;

  /**
   * Specifies end of time period for which to expand recurring events.
   */
  @Key("recurrence-expansion-end")
  public DateTime recurrenceExpansionEnd;

  /**
   * Indicates whether recurring events should be expanded or represented as a
   * single event.
   */
  @Key("singleevents")
  public Boolean singleEvents;

  /** Displays deleted/canceled events. */
  @Key("showdeleted")
  public Boolean showDeleted;

  /**
   * Displays events corresponding to invitations that the user yet to respond
   * to.
   */
  @Key("showhidden")
  public Boolean showHidden;

  /** Sorting order direction. */
  @Key("sortOrder")
  public SortOrder sortOrder;

  /**
   * Together with start-max creates a timespan such that only events that are
   * within the timespan are returned. If not specified, default start-min is
   * 1970-01-01.
   */
  @Key("start-min")
  public DateTime startMin;

  /**
   * ogether with start-min creates a timespan such that only events that are
   * within the timespan are returned. If not specified, default start-max is
   * 2031-01-01.
   */
  @Key("start-max")
  public DateTime startMax;

  /**
   * Constructs a new CalendarUrl with the given URL.
   * 
   * @param url
   */
  public CalendarUrl(String url) {
    super(url);
  }
}
